<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>数据库接口调度管理</title>
<link rel="stylesheet" type="text/css" href="../../css/reset.css" />
<link rel="stylesheet" type="text/css" href="../../css/css.css" />
<link rel="stylesheet" type="text/css"
	href="../../js/jquery-easyui-1.4.3/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="../../js/jquery-easyui-1.4.3/themes/icon.css" />
<link rel="stylesheet" type="text/css"
	href="../../js/SimpleTree1.3/js/tree_themes/SimpleTree.css" />
<link rel="stylesheet" type="text/css" href="../../css/colorReset.css" />
<style>
.tree-checkbox {
	display: inline-block;
	width: 14px;
	height: 14px;
	vertical-align: text-bottom;
	overflow: hidden;
}

#clearInterface {
	position: absolute;
	width: 20px;
	text-align: center;
	right: 52px;
	display: none;
	top: 4px;
	font-family: Cambria, "Hoefler Text", "Liberation Serif", Times,
		"Times New Roman", serif;
	color: #8F8F8F;
}

#errNotif_selection ul {
	padding: 10px;
	line-height: 18px;
}

#errNotif_selection ul li {
	border-bottom: 1px dashed #ced6db;
	padding: 0 0 0px 10px;
}

#errNotif_selection ul li label {
	padding: 5px 0;
	display: block;
}


#errorInfo li.hover {
	background-color: #ffa;
}

#errorInfo li:hover {
	background-color: #ffa;
}


#errNotif_selectionfail ul {
	padding: 10px;
	line-height: 18px;
}

#errNotif_selectionfail ul li {
	border-bottom: 1px dashed #ced6db;
	padding: 0 0 0px 10px;
}

#errNotif_selectionfail ul li label {
	padding: 5px 0;
	display: block;
}

#errorInfo li.hover {
	background-color: #ffa;
}

#errorInfo li:hover {
	background-color: #ffa;
}

#errorInfofail li.hover {
	background-color: #ffa;
}

#errorInfofail li:hover {
	background-color: #ffa;
}
.tree_con {
	height: 270px;
	overflow: auto;
	margin: 0 auto;
}
</style>
</head>

<body>
	<div class="main">
		<!-- 检索区域开始 -->
		<div class="sel_div">
			<table cellpadding="0" cellspacing="0" class="sel_con">
				<tr>
					<th colspan="6">数据检索</th>
				</tr>
				<tr>
					<td><label style="width: 60px;" >所属领域：</label> <input type="text"
						name="comboxSearchfieldName" id="comboxSearchfieldName"
						class="text" /></td>
					<td><label style="width: 60px;">所属系统：</label> <input id="comboxSearchSystemName"
						name="comboxSearchSystemName" class="text" /></td>
					<td><label style="width: 60px;" >调度名称：</label> <input id="txtSearchInterfaceName"
						name="txtSearchInterfaceSchedulingName" class="text" style="width:100px" /></td>
					<td><label style="width:38px">周期：</label> <input type="text"
						name="comboxSearchCycle" id="comboxSearchCycle" class="text" /></td>
					<td><button onclick="search()"
							class="query_btn easyui-linkbutton" iconCls="icon-search">查询</button></td>
					<td>
						<button class="query_btn easyui-linkbutton" iconCls="icon-reset"
							onclick="onReset()">重置</button>
					</td>
					<td><button onclick="export1()"
							class="query_btn easyui-linkbutton" iconCls="icon-redo">导出</button></td>
					<td>
				</tr>
			</table>
		</div>
		<div class="data_con">
			<div id="toolbox" style="padding: 5px; height: 25px">
				<div style="margin-bottom: 5px; float: left">
					<a href="javascript:void(0)" onclick="add()"
						class="easyui-linkbutton" id="toolbar_add" iconCls="icon-add"
						plain="true">新增</a> <a href="javascript:void(0)"
						onclick="update()" class="easyui-linkbutton" id="toolbar_modify"
						iconCls="icon-edit" plain="true">修改</a> <a
						href="javascript:void(0)" onclick="del()"
						class="easyui-linkbutton" id="toolbar_delete"
						iconCls="icon-remove" plain="true">刪除</a> <a
						href="javascript:void(0)" onclick="startOrStop()"
						class="easyui-linkbutton startOrStop" id="toolbar_more"
						iconCls="icon-more" plain="true">暂停/重启</a> <a
						href="javascript:void(0)" onclick="manualExecution()"
						class="easyui-linkbutton" id="toolbar_hand" iconCls="icon-hand"
						plain="true">手动执行</a> <a href="javascript:void(0)"
						onclick="refresh()" class="easyui-linkbutton" id="toolbar_reload"
						iconCls="icon-reload" plain="true">刷新</a>
				</div>
			</div>
			<table id="datagrid" style="height: 345px"
				data-options="fitColumns:true,toolbar:'#toolbox'">
			</table>


		</div>

	</div>

	<div id="win" class="easyui-window" title="数据库接口调度管理-新增"
		style="width: 730px; height: auto; top: 20px"
		data-options="iconCls:'icon-save',modal:true,minimizable:false,maximizable:false,collapsible:false">
		<form id="addForm" method="post">
			<div class="popup_con">

				<ul>
					<li><label for="comboxFieldName" class="label">所属领域：</label>
						<div class="input_con">
							<input id="comboxFieldName" name="comboxFieldName" class="text" />
						</div></li>
					<li><label for="comboxSystemName" class="label">系统名称：</label>
						<div class="input_con">
							<input type="text" name="comboxSystemName" id="comboxSystemName"
								class="text" />
						</div></li>
					<li><label for="comboxInterface" class="label">接口：</label>
						<div class="input_con" style="position: relative">
							<input class="text" type="text" name="comboxInterface"
								id="comboxInterface" />
							<!--  <a href="javascipt:void(0);" id="clearInterface">X</a>
					<button style="width:50px;" id="selInterface" >选择</button> -->


						</div></li>
					<li><label for="txtSchedulingName" class="label">调度名称：</label>
						<div class="input_con">
							<input id="txtSchedulingName" name="txtSchedulingName"
								class="easyui-validatebox text"
								data-options="required:true,validType:['unnormal','length[0,50]']"
								missingMessage="调度名称不能为空!" />
						</div></li>
					<li><label for="txtStartTime" class="label">开始时间：</label>
						<div class="input_con">
							<input class="easyui-datetimebox text" type="text"
								editable="false" name="txtStartTime" id="txtStartTime" />
						</div></li>
					<li id="end_time_li"><label for="txtEndTime" class="label">结束时间：</label>
						<div class="input_con">
							<input class="easyui-datetimebox text" type="text"
								editable="false" name="txtEndTime" id="txtEndTime" />
						</div></li>
					<li class="li_col"><label for="txtExecutionCycle"
						class="label">执行周期：</label>
						<div class="input_con">
							<span class="txtEvery">每 <input
								class="easyui-validatebox text" type="text"
								name="txtExecutionCycleNumber" id="txtExecutionCycleNumber"
								data-options="required:true,validType:['number','maxLength[11]']"
								missingMessage="请输入正确的整数!"
								style="width: 30px; text-align: center" value="1" />
							</span> <input class="easyui-validatebox" type="text"
								name="comboxExecutionCycleTime" id="comboxExecutionCycleTime"
								style="width: 80px;" /> <span class="text_tips">执行一次</span> <span
								class="daySel">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <label>&nbsp;<input
									type="checkbox" name="qx" value="2" />周一
							</label> <label>&nbsp;<input type="checkbox" name="qx" value="3" />周二
							</label> <label>&nbsp;<input type="checkbox" name="qx" value="4" />周三
							</label> <label>&nbsp;<input type="checkbox" name="qx" value="5" />周四
							</label> <label>&nbsp;<input type="checkbox" name="qx" value="6" />周五
							</label> <label>&nbsp;<input type="checkbox" name="qx" value="7" />周六
							</label> <label>&nbsp;<input type="checkbox" name="qx" value="1" />周日
							</label>
							</span>
						</div></li>

					<li>
						<label class="label">邮件发送周期：</label>
						<input class="easyui-validatebox" type="text"
								name="comboxExecutionsendEmailType" id="comboxExecutionsendEmailType"
								style="width: 80px;" />
					</li>
					
					<li><label for="txtErrorNotification" class="label">错误通知者：</label>
						<div class="input_con">
							<input class="easyui-validatebox text" type="text"
								name="txtErrorNotification" id="txtErrorNotification"
								readOnly='readOnly' />
							<button style="width: 50px;" id="selErrorNotification">选择</button>
						</div></li>
					<li><label class="label">邮件失效处理：</label>
						<div class="input_con">
							<input class="easyui-validatebox text" type="text"
								name="txtErrorNotificationfail" id="txtErrorNotificationfail"
								readOnly='readOnly' />
							<button style="width: 50px;" id="selErrorNotificationfail">选择</button>
						</div></li>
					<li><label for="overTimeSetting" class="label">超时时长：</label>
						<div class="input_con">
							<input type="text" name="overTimeSetting" id="overTimeSetting"
								class="easyui-validatebox text"
								data-options="required:true,validType:['number','maxLength[11]']"
								missingMessage="超时时长不能为空！"
								invalidMessage="超时时长数据格式不正确，请输入大于0且少于11位的正整数！" value="1800" />
							<span>秒</span>
						</div></li>
					<li><label class="label">连续提醒上限：</label>
						<div class="input_con">
							<input type="text" name="maxSendEmailNum" id="maxSendEmailNum"
								class="easyui-validatebox text"
								data-options="required:true,validType:['number','maxLength[11]']"
								missingMessage="连续邮件提醒上限长不能为空！"
								invalidMessage="连续邮件提醒上限长数据格式不正确，请输入大于0且少于11位的正整数！" value="5" />
							<span>次</span>
						</div></li>
					<li><label class="label">已经连续提醒：</label>
						<div class="input_con">
							<input type="text" name="failedNum" id="failedNum"
								class="easyui-validatebox text"
								data-options="required:true,validType:['number','maxLength[11]']"
								missingMessage="已经连续提醒长不能为空！"
								invalidMessage="已经连续提醒长数据格式不正确，请输入大于0且少于11位的正整数！" value="0" disabled="disabled"/>
							<span>次</span>
						</div></li>
					<li><label class="label">重复调度次数：</label>
						<div class="input_con">
							<input type="text" name="isAgainExecutJob" id="isAgainExecutJob"
								class="easyui-validatebox text"
								data-options="required:true,validType:['number','maxLength[11]']"
								missingMessage="重复调度次数不能为空！"
								invalidMessage="重复调度次数长数据格式不正确，请输入大于0且少于11位的正整数！" value="5" />
							<span>次</span>
						</div></li>
					<li class="li_col"><label for="txtAreaDescription"
						class="label">备注：</label>
						<div class="input_con">
							<textarea id="txtAreaDescription" name="txtAreaDescription"
								rows="4" style="width: 497px; padding: 3px;"
								class="easyui-validatebox"
								data-options="validType:'maxLength[100]'"></textarea>
						</div></li>
				</ul>
			</div>

		</form>
		<div id="buttons" class="button_con">
			<a href="javascript:void(0)" onclick="load1()"
				class="easyui-linkbutton" id="instance_save" iconCls="icon-ok"
				plain="true">保存</a> <a href="javascript:void(0)" onclick="rePage()"
				class="easyui-linkbutton" id="instance_cancel" iconCls="icon-cancel"
				plain="true">取消</a>
		</div>
	</div>


	<!--错误通知者选择-->
	<div id="errNotif_selection" style="overflow-y: hidden" title="错误通知者选择">
		<div id="buttons" class="button_con" style="padding: 10px 0 0 0">
			<!-- <a 
				href="javascript:void(0)" 
				class="easyui-linkbutton" 
				id="confirmErremail"  
				iconCls="icon-ok" 
				plain="true">确认</a> -->
			<label for="errorNotification" style="margin-left: 10px;" class="fl">名称：</label>
			<input id="errorNotification" name="errorNotification"
				class="text fl" /> <input id="errorNotificationIds" type="hidden"
				name="errorNotificationIds" class="text fl" /> <a
				href="javascript:void(0);" id="searchConfirmErremail"
				name="searchConfirmErremail" class="default_btn fl"
				style="width: 60px; display: block">搜索</a> <a
				href="javascript:void(0);" id="confirmErremail"
				name="confirmErremail" class="default_btn fl"
				style="width: 60px; display: block">确定</a>
			<div class="clearfix"></div>
		</div>
		<ul id='errorInfo'
			style="height: 200px; overflow-y: auto; overflow-x: hidden;">

		</ul>

	</div>
	
	<!--错误通知者选择-->
	<div id="errNotif_selectionfail" style="overflow-y: hidden" title="错误通知者选择">
		<div id="buttons" class="button_con" style="padding: 10px 0 0 0">
			<!-- <a 
				href="javascript:void(0)" 
				class="easyui-linkbutton" 
				id="confirmErremail"  
				iconCls="icon-ok" 
				plain="true">确认</a> -->
			<label for="errorNotificationfail" style="margin-left: 10px;" class="fl">名称：</label>
			<input id="errorNotificationfail" name="errorNotificationfail"
				class="text fl" /> <input id="errorNotificationIdsfail" type="hidden"
				name="errorNotificationIdsfail" class="text fl" /> <a
				href="javascript:void(0);" id="searchConfirmErremailfail"
				name="searchConfirmErremailfail" class="default_btn fl"
				style="width: 60px; display: block">搜索</a> <a
				href="javascript:void(0);" id="confirmErremailfail"
				name="confirmErremailfail" class="default_btn fl"
				style="width: 60px; display: block">确定</a>
			<div class="clearfix"></div>
		</div>
		<ul id='errorInfofail'
			style="height: 200px; overflow-y: auto; overflow-x: hidden;">

		</ul>

	</div>


	<script type="text/javascript" src="/webjars/json3/3.3.2/json3.min.js"></script>
	<script type="text/javascript"
		src="../../js/jquery-easyui-1.4.3/jquery.min.js"></script>
	<script type="text/javascript"
		src="../../js/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
	<script type="text/javascript"
		src="../../js/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../../js/cook/FormValidate.js"></script>
	<script type="text/javascript" src="../../js/cook/constants.js"></script>
	<script type="text/javascript" src="../../js/cook/public.js"></script>
	<script type="text/javascript"
		src="../../js/cook/LedgerManagement/InterfaceScheduling.js"></script>
	<script type="text/javascript" src="../../js/cook/Util.js"></script>
	<script>
	
	function export1(){
		 
		$.messager.confirm('确认', '确认把该搜索结果导出Excel表格 ？', function(r) {
			if (r) {
		var fieldId1 = $('#comboxSearchfieldName').combobox('getValue');
		var fieldSystemId1 = $('#comboxSearchSystemName').combobox('getValue');
		var runWay1 = $('#comboxSearchCycle').combobox('getValue');
		var name1 = $('#txtSearchInterfaceName').val();
		$.messager.progress({
			title : '处理中',
			msg : '请稍后',
		});
		location.href=BASE_URL_INTERFACE_SCHEDULE + "/findExport?fieldId="+fieldId1+"&fieldSystemId="+fieldSystemId1+"&runWay="+runWay1+"&name="+name1;
		$.messager.progress('close');
			}
		}); 
	}	
</script>
</body>
</html>
